#pragma once

#include <Windows.h>

#include <vector>

#include "AddressValidator.h"
#include "Process.h"

// Untested code!

class CachedAddressValidatorWin : public AddressValidator
{
public:
	CachedAddressValidatorWin(const ProcessPtr proc_);

	virtual const bool isAddressValid(const address_t addr);

	virtual void reset();

protected: // functions
	bool inBoundsCache(address_t addr);

protected: // members
	ProcessPtr proc;
	std::vector<MemoryBounds> bounds_cache;
};